{% set items = data('RecommendClassrooms',{'count': 1}) %}
{% if items|default(null) %}
{% set classroom = items[0] %}
<div class="panel panel-default">
  <div class="panel-heading">
    <a class="more" href="{{ path('classroom_explore') }}" ><i class="es-icon es-icon-morehoriz"></i></a>
    <h3 class="panel-title">{{ 'homepage.recommend_classroom.content_title'|trans }}</h3>
  </div>
  <div class="panel-body recommend-class-list">
    <div class="class-item mb0">
      <div class="class-img-wrap">
        <a class="class-img" href="{{ path('classroom_show', {id:classroom.id}) }}">
          <img src="{{ filepath(classroom.largePicture, 'classroom.png') }}" alt="{{ classroom.title }}" class="img-responsive">
        </a>
        <div class="mask">
          <a href="{{ path('classroom_show', {id:classroom.id}) }}" class="btn btn-warning">{{ 'explore.view_classroom_btn'|trans }}</a>
        </div>
      </div>
      <h3>
        <a class="link-dark" href="{{ path('classroom_show', {id:classroom.id}) }}">{{classroom.title}}</a>
      </h3>
      <div class="metas"> {{ 'course.widgets.recommend_classroom.tips'|trans({'%courseNum%':classroom.courseNum}) }}</div>
    </div>
  </div>
</div>
{% endif %}